/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: PACKAGE_NAME
 * @ClassName: Book
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/10/9 13:34
 * @Copyright 金斗版板所有
 */
public class Book {
    private String bookName;
    private String name;
    private String Press;
    private int money;

    public Book(){}

    public Book(String bookName,String name,String Press){
        this.bookName=bookName;
        this.name=name;
        this.Press=Press;
    }

    public String getBookName() {
        return bookName;
    }

    public String getName() {
        return name;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        if (money>10){
            this.money = money;
        }else {
            System.out.println("价格必须大于10元否则无效!!");
        }
    }

    public void show(){
        String elements=String.format("书名:"+this.bookName+"\t作者："+this.name+"" +
            "\t出版社："+this.Press+"\t价格："+this.money);
        System.out.println(elements);
    }
}
